#ifndef LEVEL_H
#define LEVEL_H

#include "EntityFactory.h"

class EntityFactory;
class EntityManager;
class Grid;
class Level
{
public:
	Level(void);
	virtual ~Level(void);

	void Init(const String& filename, EntityManager* entity_manager, EntityFactory* entity_factory);
	void Shut();

	Grid* GetGrid() { return m_grid; };


private:
	void LoadLevel(const String& filename, EntityManager* entity_manager, EntityFactory* entity_factory);

private:
	Grid* m_grid;
	
	struct LevelObject
	{
		String model_file;
		unsigned int grid_x;
		unsigned int grid_z;
	};

	struct
	{
		String grid_size_file;

		unsigned int grid_size_x;
		unsigned int grid_size_z;
		unsigned int square_size_x;
		unsigned int square_size_z;

		std::vector<LevelObject> objects;
	} m_data;

	std::map<String, EEntityType> m_entity_types;
};

#endif //LEVEL_H